package com.ityueqiangu.project.galleryinfo.service.impl;

import com.ityueqiangu.project.galleryinfo.domain.GalleryInfo;
import com.ityueqiangu.project.galleryinfo.mapper.GalleryInfoMapper;
import com.ityueqiangu.project.galleryinfo.service.IGalleryInfoService;
import com.ityueqiangu.core.util.StringUtils;
import com.ityueqiangu.core.enums.CommonEnum;
import com.ityueqiangu.core.web.result.ResultDataUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * @author Clever、xia
 * @title: GalleryInfoServiceImpl
 * @description:
 * @date 2021-03-14 11:14:22
 */
@Service
public class GalleryInfoServiceImpl implements IGalleryInfoService{

    @Autowired
    private GalleryInfoMapper galleryInfoMapper;

    /**
     * 查询分页记录
     *
     * @return 返回集合，没有返回空List
     */
     public List<GalleryInfo> selectGalleryInfoList(GalleryInfo galleryInfo) {
       return galleryInfoMapper.selectGalleryInfoList(galleryInfo);
    }


    /**
     * 根据主键查询
     *
     * @param id 主键
     * @return 返回ResultInfo
     */
    public GalleryInfo selectGalleryInfoById(Integer id) {
    	return galleryInfoMapper.selectGalleryInfoById(id);
    }
	
    /**
     * 新增
     *
     * @param galleryInfo 新增的记录
     * @return 返回ResultInfo
     */
    public Integer insertGalleryInfo(GalleryInfo galleryInfo) {
    	return galleryInfoMapper.insertGalleryInfo(galleryInfo);
    }
	
	
    /**
     * 修改
     *
     * @param galleryInfo 修改的记录
     * @return 返回
     */
    public Integer updateGalleryInfo(GalleryInfo galleryInfo) {
    	return galleryInfoMapper.updateGalleryInfo(galleryInfo);
    }
	
  
    /**
     * 删除记录
     *
     * @param id 主键
     * @return 返回
     */
    public Integer deleteGalleryInfoById(Integer id) {
    	return galleryInfoMapper.deleteGalleryInfoById(id);
    }

    @Override
    public GalleryInfo selectGalleryInfoByGalleryName(GalleryInfo galleryInfo) {
        return galleryInfoMapper.getOne(galleryInfo);
    }

}